<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>RVM : Editing JikesRVM in an IDE</title>
	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
    </head>

    <body>
	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
		    <tr>
			    <td valign="top" class="pagebody">
				    <div class="pageheader">
					    <span class="pagetitle">
                            RVM : Editing JikesRVM in an IDE
                                                    </span>
				    </div>
				    <div class="pagesubheading">
					    This page last changed on May 06, 2009 by <font color="#0050B2">dgrove</font>.
				    </div>

				    <p>One goal of the JikesRVM project over recent years has been the ability to develop JikesRVM in a development environment such as Eclipse.&nbsp; This has been possible for the MMTk component since 2005, and as of early 2007 (release 2.9.0) it is possible to work with the majority of the JikesRVM codebase in Eclipse and similar environments.&nbsp; With Jikes RVM release 2.9.1, setting up your Eclipse environment to work with Jikes RVM became even easier.</p>

<h2><a name="EditingJikesRVMinanIDE-EditingJikesRVMinEclipse"></a>Editing JikesRVM in Eclipse</h2>

<p>These instructions assume you are working with Jikes RVM version <b>2.9.1</b> or later.</p>
<ol>
	<li>Create a JikesRVM source tree either via SVN checkout or untar-ing a distribution.
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>$ svn co <a href="https://jikesrvm.svn.sf.net/svnroot/jikesrvm/rvmroot/trunk">https://jikesrvm.svn.sf.net/svnroot/jikesrvm/rvmroot/trunk</a> jikesrvm</p>
</div></div></li>
	<li>Create the machine-generated files and eclipse metadata:
	<ul>
		<li>If you have a <b>recent version</b> of Jikes RVM (<b>3.0 onwards</b>):
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>$ cd jikesrvm<br/>
$ bin/buildit &#45;-eclipse localhost</p>
</div></div>
<p><em>Note that if you will not or cannot build on your local machine</em>, substitute localhost for the name of a host you can build on (buildit will perform the build remotely and then copy the requisite files back).</p></li>
		<li>If you are working on an <b>older version</b> (<b>2.9.1 - 2.9.3</b>), you can follow this procedure:
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>$ cd jikesrvm<br/>
$ ant &#45;Dhost.name=ia32-linux &#45;Dconfig.name=development<br/>
$ ant &#45;Dhost.name=ia32-linux &#45;Dconfig.name=development eclipse-project</p>
</div></div>
<p>If you will not or cannot build on your local machine:</p>
		<ol>
			<li>copy your tree to build build host somehow</li>
			<li>perform the above ant tasks</li>
			<li>copy the following generated files and directories back to the machine you will edit on:
			<ul>
				<li>jikesrvm/.project</li>
				<li>jikesrvm/.classpath</li>
				<li>jikesrvm/eclipse</li>
			</ul>
			</li>
		</ol>
		</li>
	</ul>
	</li>
	<li>Import the newly created Eclipse project into your Eclipse workspace.
	<ol>
		<li>From Eclipse, select File--&gt;Import</li>
		<li>Select "Existing Projects Into Workspace"<br/>
<span class="image-wrap" style=""><img src="attachments/76400/5373966.jpg" style="border: 0px solid black"/></span></li>
		<li>Browse to find the top-level directory.</li>
		<li>Select the project (in this case JikesRVM ia32-linux development)<br/>
<span class="image-wrap" style=""><img src="attachments/76400/121372677.jpg" style="border: 0px solid black"/></span></li>
		<li>Hit Finish</li>
	</ol>
	</li>
</ol>


<h2><a name="EditingJikesRVMinanIDE-EditingJikesRVMinNetBeans"></a>Editing JikesRVM in NetBeans</h2>

<ol>
	<li>Follow the instructions for Eclipse including building the eclipse project with ant</li>
	<li>Install the <a href="http://www.netbeans.org/kb/articles/import-eclipse.html">Eclipse project importer</a></li>
	<li>Select File&#45;<del>&gt;Import Project</del>&#45;&gt;Eclipse Project
	<ol>
		<li>Choose to import project <a href="http://www.netbeans.org/kb/articles/eclipse-dependencies.html">ignoring project dependencies</a></li>
		<li>Select the  top-level directory you created with the JikesRVM in as the project to import</li>
		<li>Select a new folder as the destination (workspace) for the import</li>
		<li>Hit Finish</li>
	</ol>
	</li>
</ol>


				    					    <br/>
                        <div class="tabletitle">
                            <a name="attachments">Attachments:</a>
                        </div>

                        <div class="greybox" align="left">
                                                            <img src="images/icons/bullet_blue.gif" height="8" width="8" alt=""/>
                                <a href="attachments/76400/5373966.jpg">ImportWizard1.jpg</a> (image/jpeg)
                                <br/>
                                                            <img src="images/icons/bullet_blue.gif" height="8" width="8" alt=""/>
                                <a href="attachments/76400/121372677.jpg">ImportWizard2.jpg</a> (image/jpeg)
                                <br/>
                                                    </div>
				    
                    			    </td>
		    </tr>
	    </table>
	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td height="12" background="http://docs.codehaus.org/images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
			</tr>
		    <tr>
			    <td align="center"><font color="grey">Document generated by Confluence on Jul 04, 2010 19:57</font></td>
		    </tr>
	    </table>
    </body>
</html>